import request from '@/utils/request'

// 获取商品管理列表
export const getGoodsList = (data) => {
  return request({
    url: '/goods/list',
    method: 'get',
    params:data
  })
}

// 保存商品管理
export const addGoods = (data) => {
  return request({
    url: '/goods/edit',
    method: 'post',
    data: data
  })
}

// 删除商品管理
export const deleteGoods = (id) => {
  return request({
    url: '/goods/'+id,
    method: 'delete'
  })
}

// 修改商品管理
export const editGoods = (data) => {
  return request({
    url: '/goods/edit',
    method: 'put',
    data: data
  })
}

// 获取商品管理详情
export const getGoodsDetail = (id) => {
  return request({
    url: '/goods/'+id,
    method: 'get'
  })
}

